#include<stdio.h>
#pragma warning(disable:4996)
int main()
{
	int n;
	scanf("%d", &n);
	while (n)
	{
		printf("%d", n % 10);
		n / 10;

	}
	return 0;
}


#include<stdio.h>
#pragma warning(disable:4996)
int main()
{
	int x;
	scanf("%d", &x);
	int ret;
	int digital
	while (x > 0)
	{
		digital = x % 10;
		ret = ret * 10 + digital;
		printf("x=%d,digital=%d,ret=%d", x, digital, ret);
		x / 10;
	}
	printf("%d", ret);
	return 0;
}